﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace ArgusPCLib.Mathematics
{
	/// <summary>
	/// Implementors must delcare the following method:
	/// <code>
	/// public static T GetInstance();
	/// </code>
	/// where T is the implementing Type (T : IOperand).
	/// </summary>
	/// <seealso cref="ArgusPCLib.Mathematics.Reflection.OperatorReflector"/>
	/// <seealso cref="ArgusPCLib.Mathematics.Reflection.OperatorReflector{T}"/>
	public interface IOperator
	{
		/// <summary>
		/// Culture invariant symbol.
		/// </summary>
		string Symbol { get; }
		string GetSymbol(System.Globalization.CultureInfo ci);
		int Precedence { get; }
		int RequiredOperands { get; }

		Type[][] GetSupportedParameterTypes();
		IOperand ApplyOperator(IOperand[] operands);
	}
}
